/**
 * 
 */
package br.financeiro.entities;

import com.j256.ormlite.dao.ForeignCollection;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * @author evaldosavio
 * 
 */
@DatabaseTable( tableName = "person" )
public class Person {
	
	@DatabaseField( generatedId = true, columnName = "person_id" )
	private int id;
	@DatabaseField( canBeNull = false )
	private String name;
	@ForeignCollectionField
	private ForeignCollection<Phone> phones;
	@ForeignCollectionField
	private ForeignCollection<Mail> mails;

	public Person() {}

	public int getId() {
		return id;
	}

	public void setId( int id ) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName( String name ) {
		this.name = name;
	}

	public ForeignCollection<Phone> getPhones() {
		return phones;
	}

	public ForeignCollection<Mail> getMails() {
		return mails;
	}

}
